using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.ServiceProcess;
using System.Text;
using System.Threading;
using com.db4o;
namespace VWTStockHandler
{
    public partial class ManagerService : ServiceBase
    {
        ObjectServer _osDb;
        public ManagerService()
        {
            InitializeComponent();
        }

        protected override void OnStart(string[] args)
        {
            string fileName = "serviceData.yap";
            if(args[0] != null)
            {
                fileName = args[0];
            }

            _osDb = Db4o.openServer(fileName, 1444);
        }

        protected override void OnStop()
        {
            _osDb.close();
        }

    }
}
